Conversation
| } | ||
| else // miss | ||
| contribution += throughput*(rayDir.y<0.f ? float16_t3(0.1,0.7,0.03):float16_t3(0.05,0.25,1.0)); | ||
| contribution += throughput*(rayDir.y<0.f ? float16_t3(_static_cast<float16_t>(0.1f),_static_cast<float16_t>(0.7f),_static_cast<float16_t>(0.03f)):float16_t3(_static_cast<float16_t>(0.05f),_static_cast<float16_t>(0.25f),_static_cast<float16_t>(1.0f))); |
There was a problem hiding this comment.
_static_cast<float16_t3>(float32_t3(X,Y,Z)) didn't work?
Comment on lines
+48
to
49
| NBL_UNROLL for (uint32_t i = 0; i < scene_type::SphereCount; i++) | ||
| { |
There was a problem hiding this comment.
beware DXC is a piece of crap only int32_t induction variables unroll, better static cast SphereCount
| } | ||
| } | ||
| NBL_UNROLL for (int i = 0; i < scene_type::TriangleCount; i++) | ||
| NBL_UNROLL for (uint32_t i = 0; i < scene_type::TriangleCount; i++) |
| } | ||
| } | ||
| NBL_UNROLL for (int i = 0; i < scene_type::RectangleCount; i++) | ||
| NBL_UNROLL for (uint32_t i = 0; i < scene_type::RectangleCount; i++) |
| { | ||
| // prodedural shapes | ||
| NBL_UNROLL for (int i = 0; i < scene_type::SphereCount; i++) | ||
| NBL_UNROLL for (uint32_t i = 0; i < scene_type::SphereCount; i++) |
| return 0.0; | ||
| } | ||
| NBL_UNROLL for (int i = 0; i < scene_type::TriangleCount; i++) | ||
| NBL_UNROLL for (uint32_t i = 0; i < scene_type::TriangleCount; i++) |
| return 0.0; | ||
| } | ||
| NBL_UNROLL for (int i = 0; i < scene_type::RectangleCount; i++) | ||
| NBL_UNROLL for (uint32_t i = 0; i < scene_type::RectangleCount; i++) |
| uint32_t imgWidth, imgHeight, layers; | ||
| cascade.GetDimensions(imgWidth, imgHeight, layers); | ||
| retval.cascadeImageDimension = int16_t2(imgWidth, imgHeight); | ||
| retval.cascadeImageDimension = int16_t2(_static_cast<int16_t>(imgWidth), _static_cast<int16_t>(imgHeight)); |
There was a problem hiding this comment.
similar question as for the float16_t3, coult it be done with a uint32_t2 -> int16_t2 cast ?
| SResolverType resolve = SResolverType::create(pc.resolveParameters); | ||
|
|
||
| float32_t3 color = resolve(accessor, uint16_t2(coords.x, coords.y)); | ||
| float32_t3 color = resolve(accessor, uint16_t2(_static_cast<uint16_t>(coords.x), _static_cast<uint16_t>(coords.y))); |
Comment on lines
+94
to
127
| for (uint16_t i = 0; i < 2; i++) | ||
| output.uintDim2[i] = qs.get(i); | ||
| } | ||
| { | ||
| sampling::QuantizedSequence<uint32_t, 3> qs = sampling::QuantizedSequence<uint32_t, 3>::create(input.uvec3); | ||
| for (uint32_t i = 0; i < 3; i++) | ||
| for (uint16_t i = 0; i < 3; i++) | ||
| output.uintDim3[i] = qs.get(i); | ||
| } | ||
| { | ||
| sampling::QuantizedSequence<uint32_t, 4> qs = sampling::QuantizedSequence<uint32_t, 4>::create(input.uvec4); | ||
| for (uint32_t i = 0; i < 4; i++) | ||
| for (uint16_t i = 0; i < 4; i++) | ||
| output.uintDim4[i] = qs.get(i); | ||
| } | ||
|
|
||
| { | ||
| sampling::QuantizedSequence<uint32_t2, 2> qs = sampling::QuantizedSequence<uint32_t2, 2>::create(input.uvec2); | ||
| for (uint32_t i = 0; i < 2; i++) | ||
| for (uint16_t i = 0; i < 2; i++) | ||
| output.uintVec2_Dim2[i] = qs.get(i); | ||
| } | ||
| { | ||
| sampling::QuantizedSequence<uint32_t2, 3> qs = sampling::QuantizedSequence<uint32_t2, 3>::create(input.uvec3); | ||
| for (uint32_t i = 0; i < 3; i++) | ||
| for (uint16_t i = 0; i < 3; i++) | ||
| output.uintVec2_Dim3[i] = qs.get(i); | ||
| } | ||
|
|
||
| { | ||
| sampling::QuantizedSequence<uint32_t3, 3> qs = sampling::QuantizedSequence<uint32_t3, 3>::create(input.uvec3); | ||
| for (uint32_t i = 0; i < 3; i++) | ||
| for (uint16_t i = 0; i < 3; i++) | ||
| output.uintVec3_Dim3[i] = qs.get(i); | ||
| } | ||
| { | ||
| sampling::QuantizedSequence<uint32_t4, 4> qs = sampling::QuantizedSequence<uint32_t4, 4>::create(input.uvec4); | ||
| for (uint32_t i = 0; i < 4; i++) | ||
| for (uint16_t i = 0; i < 4; i++) | ||
| output.uintVec4_Dim4[i] = qs.get(i); |
There was a problem hiding this comment.
unroll just got ruined, use int32_t
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.